Optimal. Leaf size=197 \[ -\frac {4 a \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (17 a^2-9 b^2\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 b \sin (c+d x) (a+b \cos (c+d x))^{3/2}}{5 d}+\frac {4 a b \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.219, Rules used = {3016, 2753, 2752, 2663, 2661, 2655, 2653} \[ -\frac {4 a \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (17 a^2-9 b^2\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 b \sin (c+d x) (a+b \cos (c+d x))^{3/2}}{5 d}+\frac {4 a b \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2753
Rule 3016
Rubi steps
\begin {align*} \int \sqrt {a+b \cos (c+d x)} \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx &=-\int (-a+b \cos (c+d x)) (a+b \cos (c+d x))^{3/2} \, dx\\ &=-\frac {2 b (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}-\frac {2}{5} \int \sqrt {a+b \cos (c+d x)} \left (\frac {1}{2} \left (-5 a^2+3 b^2\right )-a b \cos (c+d x)\right ) \, dx\\ &=\frac {4 a b \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}-\frac {4}{15} \int \frac {-\frac {1}{4} a \left (15 a^2-7 b^2\right )-\frac {1}{4} b \left (17 a^2-9 b^2\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx\\ &=\frac {4 a b \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}-\frac {1}{15} \left (2 a \left (a^2-b^2\right )\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx-\frac {1}{15} \left (-17 a^2+9 b^2\right ) \int \sqrt {a+b \cos (c+d x)} \, dx\\ &=\frac {4 a b \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}-\frac {\left (\left (-17 a^2+9 b^2\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (2 a \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \left (17 a^2-9 b^2\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {4 a \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {a+b \cos (c+d x)}}+\frac {4 a b \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.85, size = 178, normalized size = 0.90 \[ \frac {-b \sin (c+d x) \left (2 a^2+8 a b \cos (c+d x)+3 b^2 \cos (2 (c+d x))+3 b^2\right )-4 a \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+2 \left (17 a^3+17 a^2 b-9 a b^2-9 b^3\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.95, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-{\left (b^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \sqrt {b \cos \left (d x + c\right ) + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int -{\left (b^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \sqrt {b \cos \left (d x + c\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.60, size = 662, normalized size = 3.36 \[ \frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (24 \left (\cos ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+16 \left (\cos ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}-48 \left (\cos ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+2 \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b -24 \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+30 \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+2 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a^{3}-2 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a \,b^{2}-17 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a^{3}+17 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a^{2} b +9 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a \,b^{2}-9 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) b^{3}-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} b +8 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a \,b^{2}-6 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) b^{3}\right )}{15 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +\left (a +b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a +b}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\int {\left (b^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \sqrt {b \cos \left (d x + c\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (a^2-b^2\,{\cos \left (c+d\,x\right )}^2\right )\,\sqrt {a+b\,\cos \left (c+d\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a - b \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right )^{\frac {3}{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________